home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 5
/
Eagles_Nest_Mac_Collection_Disc_5.TOAST
/
Science & Religion
/
MacAtoms301
/
MacAtoms301
/
MacAtoms 3.0.1.rsrc
/
TEXT_2000_PS.txt
< prev
next >
Wrap
Text File
|
1990-10-30
|
1KB
|
74 lines
%% Copyright Hilary D. Jones, 1989-1990
/out {print flush} def
(Setting up.\n) out
/unit.matrix [1 0 0 1 0 0] def
/inFile (%stdin) (r) file def
/getToken {inFile token pop} bind def
/getCopies { /#copies #copies def } bind def
/getTypes { /numTypes getToken def } bind def
/getRadii {
/radii numTypes array def
/diam numTypes array def
0 1 numTypes 1 sub { radii exch getToken put } for
0 1 numTypes 1 sub { diam exch dup radii exch get 2 mul 1 add put } for
} bind def
/getRow {
exch dup 3 -1 roll getToken put
} bind def
/getData {
dup diam exch get array
exch diam exch get 1 sub 0 exch 1 exch
{getRow } for
} bind def
/getPictures {
/idat numTypes array def
0 1 numTypes 1 sub {idat exch dup getData put} for
} bind def
/row {
idat aType get
nrow get
/nrow nrow 1 add def
} bind def
/border {
newpath
radii exch get dup dup 0 360 arc
closepath
} bind def
/pim {
gsave
translate
/aType exch def
aType border clip
/nrow 0 def
diam aType get dup 1
unit.matrix
{ row }
image
grestore
} bind def
/plotOne {
getToken
dup radii exch get dup
getToken exch sub
exch getToken exch sub
pim
} bind def
/plotAtoms {
1 1 getToken {pop plotOne} for
} bind def
/doit {
gsave
initgraphics
unit.matrix setmatrix
getCopies
getTypes
getRadii
(Transferring image data.\n) out
getPictures
(Rendering images\n) out
plotAtoms
grestore
} bind def
(Setup complete\n) out
doit